package io.jsen.meta.diff.annotation.parser;

import io.jsen.meta.diff.annotation.empty.IgnoreConvert;
import io.jsen.meta.diff.obj.Convert;
import lombok.AllArgsConstructor;

/**
 * @author jsen
 * @date 2021/8/10
 */
@AllArgsConstructor
@SuppressWarnings("all")
public class CoConvert {
    private final Convert nativeConvert;
    private final Convert metaConvert;

    public Convert getNative() {
        if (nativeConvert != null && !(nativeConvert instanceof IgnoreConvert)) {
            return nativeConvert;
        }
        return null;
    }

    public Convert getMeta() {
        if (metaConvert != null && !(metaConvert instanceof IgnoreConvert)) {
            return metaConvert;
        }
        return null;
    }
}
